package com.macro.mall.mapper;

import com.macro.mall.model.PmProdStock;
import com.macro.mall.model.PmProdStockExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PmProdStockMapper {
    long countByExample(PmProdStockExample example);

    int deleteByExample(PmProdStockExample example);

    int deleteByPrimaryKey(Long id);

    int insert(PmProdStock record);

    int insertSelective(PmProdStock record);

    List<PmProdStock> selectByExample(PmProdStockExample example);

    List<PmProdStock> selectByDays(@Param("record") PmProdStock record,@Param("beginDay") String beginDay,@Param("endDay") String endDay );

    PmProdStock selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") PmProdStock record, @Param("example") PmProdStockExample example);

    int updateByExample(@Param("record") PmProdStock record, @Param("example") PmProdStockExample example);

    int updateByPrimaryKeySelective(PmProdStock record);

    int updateByPrimaryKey(PmProdStock record);

    List<PmProdStock> selectByPmProdStock(PmProdStock record);

    int addStockByPrimaryKey(@Param("id") Long id ,@Param("changeStock") Float changeStock);

    int deductStockByPrimaryKey(@Param("id") Long id ,@Param("changeStock") Float changeStock);

    int rollbackStockByPrimaryKey(@Param("id") Long id ,@Param("changeStock") Float changeStock);

}